package org.puresilk.app.hello.actions;

import javax.servlet.http.HttpServletRequest;

import org.puresilk.app.SilkAction;

public class Index extends SilkAction {
	private static String DEFAULT_NAME = "Cloud";
	
	@Override
	public String execute(HttpServletRequest req) {
		// check for requested name
		String name = req.getParameter("name");
	
		// use default name
		if (name == null)
			name = DEFAULT_NAME;
		
		req.setAttribute("name", name);
		String nxtPage = "/hello/index.jsp";
			
		return nxtPage;
	
	}

}
